package com.muyu.system.danmo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.muyu.common.core.enums.PayChannel;
import com.muyu.common.core.enums.PayStatus;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 退款订单
 * </p>
 *
 * @author 作者
 * @since 2025-04-06
 */
@Getter
@Setter
@TableName("refund_order")
public class RefundOrder extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 支付订单id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 商户编号(本系统)
     */
    @TableField("mch_code")
    private String mchCode;

    /**
     * 支付通道  1 微信 2支付宝
     */
    @TableField("pay_channel")
    private PayChannel payChannel;

    /**
     * 退款金额（分）
     */
    @TableField("refund_amount")
    private Long refundAmount;

    /**
     * 退款单号
     */
    @TableField("refund_order_no")
    private String refundOrderNo;

    /**
     * 三方退款单号
     */
    @TableField("refund_transaction_id")
    private String refundTransactionId;

    /**
     * 业务方退款单号
     */
    @TableField("refund_biz_order_no")
    private String refundBizOrderNo;

    /**
     * 支付订单号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 退款状态 1成功  2失败 3进行中 4超时
     */
    @TableField("refund_status")
    private PayStatus refundStatus;

    /**
     * 退款完成时间
     */
    @TableField("completed_date")
    private LocalDateTime completedDate;

}
